package cn.luischen.aspect;

import java.util.Arrays;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import cn.luischen.service.log.LogService;

import static org.junit.Assert.*;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.*;
import org.junit.Rule;
import org.junit.runner.RunWith;
import org.junit.rules.ExpectedException;
import org.junit.Test;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.modules.junit4.PowerMockRunner;
import org.powermock.reflect.Whitebox;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.mockito.stubbing.Answer;
import java.lang.reflect.Method;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.TypeReference;
import com.alibaba.fastjson.parser.ParserConfig;
import java.util.Map;
import java.util.List;
import com.unitspirit.runtime.*;
/**
 * The class contains tests for the class cn.luischen.aspect.WebLogAspect.
*
* @generatedBy UnitSpirit CreateTemplateTestFile4
* @version 1.0.9.11 
*/
@PowerMockIgnore({"javax.management.*"})
public class WebLogAspect_doBefore_WGTest {
  @Rule  
  public ExpectedException unitspirit_thrown= ExpectedException.none();
  /**
  * 测试方法初始化.
  * 
  * @throws Exception 
  *         if the initialization fails for some reason 
  *  
  * @generatedBy UnitSpirit at 2021-12-08 11:01:03
  */  
 @org.junit.Before 
  public void setUp()  throws Exception 
  { 
    try{
    GlobalUnitInit.init(); 
    MockitoAnnotations.initMocks(this);
   ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
}catch(Exception ex){
  ex.printStackTrace();
}
  }

  
@InjectMocks 
cn.luischen.aspect.WebLogAspect unitspirit_fixture;

@Mock 
cn.luischen.service.log.LogService mock_LogService;

  /**
  * @date 2021-12-08 11:01:04
  * @see cn.luischen.aspect.WebLogAspect#doBefore
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_doBefore_1207_113909_364_1_01() throws Throwable {
    //被测函数参数定义
    org.aspectj.lang.JoinPoint JoinPoint_p_0 = Mockito.mock(org.aspectj.lang.JoinPoint.class);
  //成员变量设置


		ThreadLocal<Long> m_un_startTime = new ThreadLocal<>();
		m_un_startTime.set(1L);
		Whitebox.setInternalState(unitspirit_fixture, "startTime",m_un_startTime);
    //返回值定义 
    //该函数无返回值 



      unitspirit_fixture.doBefore(JoinPoint_p_0);
    assertTrue(true);
  }
  /**
  * @date 2021-12-08 11:01:04
  * @see cn.luischen.aspect.WebLogAspect#doBefore
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_doBefore_1207_113923_121_1_01() throws Throwable {
    //被测函数参数定义
    org.aspectj.lang.JoinPoint JoinPoint_p_0 = Mockito.mock(org.aspectj.lang.JoinPoint.class);
  //成员变量设置


		ThreadLocal<Long> m_un_startTime = new ThreadLocal<>();
		m_un_startTime.set(1L);
		Whitebox.setInternalState(unitspirit_fixture, "startTime",m_un_startTime);
    //返回值定义 
    //该函数无返回值 



      unitspirit_fixture.doBefore(JoinPoint_p_0);
    assertTrue(true);
  }
  /**
  * @date 2021-12-08 11:01:04
  * @see cn.luischen.aspect.WebLogAspect#doBefore
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_doBefore_1207_113938_992_1_01() throws Throwable {
    //被测函数参数定义
    org.aspectj.lang.JoinPoint JoinPoint_p_0 = Mockito.mock(org.aspectj.lang.JoinPoint.class);
  //成员变量设置


		ThreadLocal<Long> m_un_startTime = new ThreadLocal<>();
		m_un_startTime.set(1L);
		Whitebox.setInternalState(unitspirit_fixture, "startTime",m_un_startTime);
    //返回值定义 
    //该函数无返回值 



      unitspirit_fixture.doBefore(JoinPoint_p_0);
    assertTrue(true);
  }
  /**
  * @date 2021-12-08 11:01:04
  * @see cn.luischen.aspect.WebLogAspect#doBefore
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_doBefore_1207_114033_086_1_01() throws Throwable {
    //被测函数参数定义
    org.aspectj.lang.JoinPoint JoinPoint_p_0 = Mockito.mock(org.aspectj.lang.JoinPoint.class);
  //成员变量设置


		ThreadLocal<Long> m_un_startTime = new ThreadLocal<>();
		m_un_startTime.set(1L);
		Whitebox.setInternalState(unitspirit_fixture, "startTime",m_un_startTime);
    //返回值定义 
    //该函数无返回值 



      unitspirit_fixture.doBefore(JoinPoint_p_0);
    assertTrue(true);
  }
  /**
  * @date 2021-12-08 11:01:04
  * @see cn.luischen.aspect.WebLogAspect#doBefore
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_doBefore_1207_114045_619_1_01() throws Throwable {
    //被测函数参数定义
    org.aspectj.lang.JoinPoint JoinPoint_p_0 = Mockito.mock(org.aspectj.lang.JoinPoint.class);
  //成员变量设置


		ThreadLocal<Long> m_un_startTime = new ThreadLocal<>();
		m_un_startTime.set(1L);
		Whitebox.setInternalState(unitspirit_fixture, "startTime",m_un_startTime);
    //返回值定义 
    //该函数无返回值 



      unitspirit_fixture.doBefore(JoinPoint_p_0);
    assertTrue(true);
  }
  /**
  * @date 2021-12-08 11:01:04
  * @see cn.luischen.aspect.WebLogAspect#doBefore
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_doBefore_1207_114054_261_1_01() throws Throwable {
    //被测函数参数定义
    org.aspectj.lang.JoinPoint JoinPoint_p_0 = Mockito.mock(org.aspectj.lang.JoinPoint.class);
  //成员变量设置


		ThreadLocal<Long> m_un_startTime = new ThreadLocal<>();
		m_un_startTime.set(1L);
		Whitebox.setInternalState(unitspirit_fixture, "startTime",m_un_startTime);
    //返回值定义 
    //该函数无返回值 



      unitspirit_fixture.doBefore(JoinPoint_p_0);
    assertTrue(true);
  }
  /**
  * @date 2021-12-08 11:01:04
  * @see cn.luischen.aspect.WebLogAspect#doBefore
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_doBefore_1207_114117_826_1_01() throws Throwable {
    //被测函数参数定义
    org.aspectj.lang.JoinPoint JoinPoint_p_0 = Mockito.mock(org.aspectj.lang.JoinPoint.class);
  //成员变量设置


		ThreadLocal<Long> m_un_startTime = new ThreadLocal<>();
		m_un_startTime.set(1L);
		Whitebox.setInternalState(unitspirit_fixture, "startTime",m_un_startTime);
    //返回值定义 
    //该函数无返回值 



      unitspirit_fixture.doBefore(JoinPoint_p_0);
    assertTrue(true);
  }
  /**
  * @date 2021-12-08 11:01:04
  * @see cn.luischen.aspect.WebLogAspect#doBefore
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_doBefore_1207_114145_590_1_01() throws Throwable {
    //被测函数参数定义
    org.aspectj.lang.JoinPoint JoinPoint_p_0 = Mockito.mock(org.aspectj.lang.JoinPoint.class);
  //成员变量设置


		ThreadLocal<Long> m_un_startTime = new ThreadLocal<>();
		m_un_startTime.set(1L);
		Whitebox.setInternalState(unitspirit_fixture, "startTime",m_un_startTime);
    //返回值定义 
    //该函数无返回值 



      unitspirit_fixture.doBefore(JoinPoint_p_0);
    assertTrue(true);
  }
  /**
  * @date 2021-12-08 11:01:04
  * @see cn.luischen.aspect.WebLogAspect#doBefore
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_doBefore_1214_120430_856_1_01() throws Throwable {
    //被测函数参数定义
    org.aspectj.lang.JoinPoint JoinPoint_p_0 = Mockito.mock(org.aspectj.lang.JoinPoint.class);
  //成员变量设置


		ThreadLocal<Long> m_un_startTime = new ThreadLocal<>();
		m_un_startTime.set(1L);
		Whitebox.setInternalState(unitspirit_fixture, "startTime",m_un_startTime);
    //返回值定义 
    //该函数无返回值 



      unitspirit_fixture.doBefore(JoinPoint_p_0);
    assertTrue(true);
  }
  /**
  * @date 2021-12-08 11:01:04
  * @see cn.luischen.aspect.WebLogAspect#doBefore
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_doBefore_1214_120434_222_1_01() throws Throwable {
    //被测函数参数定义
    org.aspectj.lang.JoinPoint JoinPoint_p_0 = Mockito.mock(org.aspectj.lang.JoinPoint.class);
  //成员变量设置


		ThreadLocal<Long> m_un_startTime = new ThreadLocal<>();
		m_un_startTime.set(1L);
		Whitebox.setInternalState(unitspirit_fixture, "startTime",m_un_startTime);
    //返回值定义 
    //该函数无返回值 



      unitspirit_fixture.doBefore(JoinPoint_p_0);
    assertTrue(true);
  }
  /**
  * @date 2021-12-08 11:01:04
  * @see cn.luischen.aspect.WebLogAspect#doBefore
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_doBefore_1214_120434_507_1_01() throws Throwable {
    //被测函数参数定义
    org.aspectj.lang.JoinPoint JoinPoint_p_0 = Mockito.mock(org.aspectj.lang.JoinPoint.class);
  //成员变量设置


		ThreadLocal<Long> m_un_startTime = new ThreadLocal<>();
		m_un_startTime.set(1L);
		Whitebox.setInternalState(unitspirit_fixture, "startTime",m_un_startTime);
    //返回值定义 
    //该函数无返回值 



      unitspirit_fixture.doBefore(JoinPoint_p_0);
    assertTrue(true);
  }
  /**
  * @date 2021-12-08 11:01:04
  * @see cn.luischen.aspect.WebLogAspect#doBefore
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_doBefore_1214_120458_530_1_01() throws Throwable {
    //被测函数参数定义
    org.aspectj.lang.JoinPoint JoinPoint_p_0 = Mockito.mock(org.aspectj.lang.JoinPoint.class);
  //成员变量设置


		ThreadLocal<Long> m_un_startTime = new ThreadLocal<>();
		m_un_startTime.set(1L);
		Whitebox.setInternalState(unitspirit_fixture, "startTime",m_un_startTime);
    //返回值定义 
    //该函数无返回值 



      unitspirit_fixture.doBefore(JoinPoint_p_0);
    assertTrue(true);
  }
  /**
  * @date 2021-12-08 11:01:04
  * @see cn.luischen.aspect.WebLogAspect#doBefore
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_doBefore_1214_120509_373_1_01() throws Throwable {
    //被测函数参数定义
    org.aspectj.lang.JoinPoint JoinPoint_p_0 = Mockito.mock(org.aspectj.lang.JoinPoint.class);
  //成员变量设置


		ThreadLocal<Long> m_un_startTime = new ThreadLocal<>();
		m_un_startTime.set(1L);
		Whitebox.setInternalState(unitspirit_fixture, "startTime",m_un_startTime);
    //返回值定义 
    //该函数无返回值 



      unitspirit_fixture.doBefore(JoinPoint_p_0);
    assertTrue(true);
  }
  /**
  * @date 2021-12-08 11:01:04
  * @see cn.luischen.aspect.WebLogAspect#doBefore
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_doBefore_1214_120517_579_1_01() throws Throwable {
    //被测函数参数定义
    org.aspectj.lang.JoinPoint JoinPoint_p_0 = Mockito.mock(org.aspectj.lang.JoinPoint.class);
  //成员变量设置


		ThreadLocal<Long> m_un_startTime = new ThreadLocal<>();
		m_un_startTime.set(1L);
		Whitebox.setInternalState(unitspirit_fixture, "startTime",m_un_startTime);
    //返回值定义 
    //该函数无返回值 



      unitspirit_fixture.doBefore(JoinPoint_p_0);
    assertTrue(true);
  }
  /**
  * @date 2021-12-08 11:01:04
  * @see cn.luischen.aspect.WebLogAspect#doBefore
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_doBefore_20210609_175412_119_1_01() throws Throwable {
    //被测函数参数定义
    org.aspectj.lang.JoinPoint JoinPoint_p_0 = Mockito.mock(org.aspectj.lang.JoinPoint.class);
  //成员变量设置


		ThreadLocal<Long> m_un_startTime = new ThreadLocal<>();
		m_un_startTime.set(1L);
		Whitebox.setInternalState(unitspirit_fixture, "startTime",m_un_startTime);
    //返回值定义 
    //该函数无返回值 
  javax.servlet.http.HttpServletRequest  mock_sub_caller_HttpServletRequest4 = PowerMockito.mock(javax.servlet.http.HttpServletRequest.class);
    javax.servlet.http.HttpSession mock_result_HttpSession4 =  PowerMockito.mock(javax.servlet.http.HttpSession.class);
    StringBuffer mock_result_StringBuffer3 = new java.lang.StringBuffer("\"http://127.0.0.1:8080/admin/login\"");
    String mock_result_String2 = "\"GET\"";
    String mock_result_String1 = "\"127.0.0.1\"";

    PowerMockito.when( mock_sub_caller_HttpServletRequest4.getSession()).thenReturn( mock_result_HttpSession4);
    PowerMockito.when( mock_sub_caller_HttpServletRequest4.getRequestURL()).thenReturn( mock_result_StringBuffer3);
    PowerMockito.when( mock_sub_caller_HttpServletRequest4.getMethod()).thenReturn( mock_result_String2);
    PowerMockito.when( mock_sub_caller_HttpServletRequest4.getRemoteAddr()).thenReturn( mock_result_String1);

      unitspirit_fixture.doBefore(JoinPoint_p_0);
    assertTrue(true);
  }
  /**
  * @date 2021-12-08 11:01:04
  * @see cn.luischen.aspect.WebLogAspect#doBefore
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_doBefore_20210609_175416_472_1_01() throws Throwable {
    //被测函数参数定义
    org.aspectj.lang.JoinPoint JoinPoint_p_0 = Mockito.mock(org.aspectj.lang.JoinPoint.class);
  //成员变量设置


		ThreadLocal<Long> m_un_startTime = new ThreadLocal<>();
		m_un_startTime.set(1L);
		Whitebox.setInternalState(unitspirit_fixture, "startTime",m_un_startTime);
    //返回值定义 
    //该函数无返回值 
  javax.servlet.http.HttpServletRequest  mock_sub_caller_HttpServletRequest4 = PowerMockito.mock(javax.servlet.http.HttpServletRequest.class);
    javax.servlet.http.HttpSession mock_result_HttpSession4 =  PowerMockito.mock(javax.servlet.http.HttpSession.class);
    StringBuffer mock_result_StringBuffer3 = new java.lang.StringBuffer("\"http://127.0.0.1:8080/admin/login\"");
    String mock_result_String2 = "\"POST\"";
    String mock_result_String1 = "\"127.0.0.1\"";

    PowerMockito.when( mock_sub_caller_HttpServletRequest4.getSession()).thenReturn( mock_result_HttpSession4);
    PowerMockito.when( mock_sub_caller_HttpServletRequest4.getRequestURL()).thenReturn( mock_result_StringBuffer3);
    PowerMockito.when( mock_sub_caller_HttpServletRequest4.getMethod()).thenReturn( mock_result_String2);
    PowerMockito.when( mock_sub_caller_HttpServletRequest4.getRemoteAddr()).thenReturn( mock_result_String1);

      unitspirit_fixture.doBefore(JoinPoint_p_0);
    assertTrue(true);
  }
  /**
  * @date 2021-12-08 11:01:04
  * @see cn.luischen.aspect.WebLogAspect#doBefore
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_doBefore_20210609_175420_949_1_01() throws Throwable {
    //被测函数参数定义
    org.aspectj.lang.JoinPoint JoinPoint_p_0 = Mockito.mock(org.aspectj.lang.JoinPoint.class);
  //成员变量设置


		ThreadLocal<Long> m_un_startTime = new ThreadLocal<>();
		m_un_startTime.set(1L);
		Whitebox.setInternalState(unitspirit_fixture, "startTime",m_un_startTime);
    //返回值定义 
    //该函数无返回值 
  javax.servlet.http.HttpServletRequest  mock_sub_caller_HttpServletRequest4 = PowerMockito.mock(javax.servlet.http.HttpServletRequest.class);
    javax.servlet.http.HttpSession mock_result_HttpSession4 =  PowerMockito.mock(javax.servlet.http.HttpSession.class);
    StringBuffer mock_result_StringBuffer3 = new java.lang.StringBuffer("\"http://127.0.0.1:8080/admin/logout\"");
    String mock_result_String2 = "\"GET\"";
    String mock_result_String1 = "\"127.0.0.1\"";

    PowerMockito.when( mock_sub_caller_HttpServletRequest4.getSession()).thenReturn( mock_result_HttpSession4);
    PowerMockito.when( mock_sub_caller_HttpServletRequest4.getRequestURL()).thenReturn( mock_result_StringBuffer3);
    PowerMockito.when( mock_sub_caller_HttpServletRequest4.getMethod()).thenReturn( mock_result_String2);
    PowerMockito.when( mock_sub_caller_HttpServletRequest4.getRemoteAddr()).thenReturn( mock_result_String1);

      unitspirit_fixture.doBefore(JoinPoint_p_0);
    assertTrue(true);
  }
  /**
  * @date 2021-12-08 11:01:04
  * @see cn.luischen.aspect.WebLogAspect#doBefore
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_doBefore_20211109_110223_933_1_01() throws Throwable {
    //被测函数参数定义
    org.aspectj.lang.JoinPoint JoinPoint_p_0 = Mockito.mock(org.aspectj.lang.JoinPoint.class);
  //成员变量设置


		ThreadLocal<Long> m_un_startTime = new ThreadLocal<>();
		m_un_startTime.set(1L);
		Whitebox.setInternalState(unitspirit_fixture, "startTime",m_un_startTime);
    //返回值定义 
    //该函数无返回值 



      unitspirit_fixture.doBefore(JoinPoint_p_0);
    assertTrue(true);
  }
  /**
  * @date 2021-12-08 11:01:04
  * @see cn.luischen.aspect.WebLogAspect#doBefore
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_doBefore_20211109_110315_768_1_01() throws Throwable {
    //被测函数参数定义
    org.aspectj.lang.JoinPoint JoinPoint_p_0 = Mockito.mock(org.aspectj.lang.JoinPoint.class);
  //成员变量设置


		ThreadLocal<Long> m_un_startTime = new ThreadLocal<>();
		m_un_startTime.set(1L);
		Whitebox.setInternalState(unitspirit_fixture, "startTime",m_un_startTime);
    //返回值定义 
    //该函数无返回值 



      unitspirit_fixture.doBefore(JoinPoint_p_0);
    assertTrue(true);
  }
  /**
  * @date 2021-12-08 11:01:04
  * @see cn.luischen.aspect.WebLogAspect#doBefore
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_doBefore_20211109_110317_805_1_01() throws Throwable {
    //被测函数参数定义
    org.aspectj.lang.JoinPoint JoinPoint_p_0 = Mockito.mock(org.aspectj.lang.JoinPoint.class);
  //成员变量设置


		ThreadLocal<Long> m_un_startTime = new ThreadLocal<>();
		m_un_startTime.set(1L);
		Whitebox.setInternalState(unitspirit_fixture, "startTime",m_un_startTime);
    //返回值定义 
    //该函数无返回值 



      unitspirit_fixture.doBefore(JoinPoint_p_0);
    assertTrue(true);
  }
}